Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MCP adapters to autogen-ext #5251

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

richard-gyiko
Copy link
Contributor

@richard-gyiko richard-gyiko commented Jan 29, 2025

Why are these changes needed?

The increasing popularity of MCP decided to migrate the community extension into the autogen-ext package.

Related issue number

Checks

@richard-gyiko richard-gyiko changed the title Add Stdio and SSE based MCP tool adapters Add MCP adapters to autogen-ext Jan 29, 2025
@richard-gyiko
Copy link
Contributor Author

@microsoft-github-policy-service agree

@richard-gyiko richard-gyiko marked this pull request as ready for review January 30, 2025 09:08
@victordibia
Copy link
Collaborator

Hi @richard-gyiko ,

Thanks for this PR ..
Can you provide some instructions on how to test with this a local MCP server? The example you have hints at some url with an mcp server and translate tool capabilities. Is there a clear way to set it up and test locally?
I tried setting up a sample mcp server (and could explore it locally using the mcp inspector), but it was unclear how to use it with the tool interface provided here.

@richard-gyiko
Copy link
Contributor Author

Hi @victordibia ,

I've updated the sample on the community repo which now includes the fetch and the file system MCP server tools:
https://github.com/richard-gyiko/autogen-ext-mcp/tree/main/samples

MCP Server installations and usage is covered in the README and the sample code.

Hope it gives sufficient amount of information. If not, please let me know.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would this functionality be better served by something like the Workbench design rather than a one-off factory

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Workbench seems to be a higher-level concept to me. You could add the tools gathered with the factory method to the workbench if you wanted to. Am I missing something?



@asynccontextmanager
async def create_mcp_server_session(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When running the mcp code locally I was running into the following bug: modelcontextprotocol/python-sdk#169. Have you run into it by any chance?

Copy link
Contributor Author

@richard-gyiko richard-gyiko Feb 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just ran this sample:
https://github.com/richard-gyiko/autogen-ext-mcp/blob/main/samples/agent_chat.py and I saw no sign of this bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants